class Student {
 static String schoolName; // 定义静态变量schoolName
 String name;
}

public class Example12 {
 public static void main(String[] args) {
  Student student1 = new Student(); // 创建学生对象student1
  Student student2 = new Student();//创建学生对象student2
  student1.name="张三";
  student2.name="李四";
  Student.schoolName = "仰恩大学"; // 为静态变量赋值
  student2.schoolName="华侨大学";
  System.out.println(student1.schoolName); // 打印第一个学生对象的学校
  System.out.println(student2.schoolName); // 打印第二个学生对象的学校
 }
}
